<template>
	<view class="page-order page">
		<cc-tabs :active="active" :tab-list="groups" @tabsClick="tabsClick"></cc-tabs>
		<view style="padding-top: 20rpx;"></view>
		<order-card :order="order" v-for="(it, i) in 4 " :key="i">

		</order-card>

	</view>
</template>

<script>
	export default {
		data() {
			return {
				order: {
					id: 1,
					order_sn: '202301020145214',
					state: 1,
					items: [1, 2],
					total: 999.82,
					time: '2024-4-1 10:22:12'
				},
				groups: [{
						name: '待付款',
						id: 0
					}, {
						name: '待发货',
						id: 1
					}, {
						name: '待收货',
						id: 2
					}, {
						name: '待评价',
						id: 3
					},
					{
						name: '已完成',
						id: 4
					}
				],
				active: 0,
			}
		},
		methods: {
			tabsClick(item, index) {
				this.active = item.id
			}
		}
	}
</script>

<style lang="scss" scoped>
	.page-order {
		background: #f5f5f5;
	}
</style>